package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2023-10-16
 * Time: 18:02
 */
public class Test5 {
    public static void main(String[] args) {
        int n = -1;
        int count = 0;
        while (n != 0) {
            n = n&(n-1);
            count++;
        }
        System.out.println(count);
    }
}
